package com.tz.util.weixinUtils.template;

/**
 * @description 微信消息推送模板枚举类
 * 				模板序号，模板ID均跟微信公众号模板消息里设置的一样
 * @author yangcd
 * @date 2017年06月03日00:23:50
 */
public enum WeixinMsgPushEnum {
	T1(1,"AJIj7I2P4lk3dYt2jgfTeociZzoVI2A_eyv8_7mbV1I","付款成功通知"),
	T2(2,"FnImEitwXDUMx8Chdnz2y8txfF6LE8tNNPaPoou4YRs","换款订单提交成功通知"),
	T3(3,"KwkJ9eZYk9b4DfSDqVALeDL6V_tEbuivO4w8TyZL0RI","检测报告通知"),
	T4(4,"L54xkVoYKXmU7-f999d4PgmODaslj-yc-fIQ5P8zTRI","回收订单提交成功通知"),
	T5(5,"OrlQvRMXQGDOkkc5FqDmqj3Hj7yCbxxvUfk6ox1WImQ","放弃产品回收取货通知"),
	T6(6,"T69ZQBvuGGTvePu3yKvjPlRmzXDVOXq7uwNqatNvv5M","翻新订单发货通知"),
	T7(7,"Yh5OHi-GxpCgRFQgIBg3VmGXK7G-zAcK9xNfX0_ZoFs","确认换款通知"),
	T8(8,"b-fSJRBPvoVDFhxoIRCvHnG_fPp0Q2OlcxBNg-ks9CQ","放弃产品回收发货通知"),
	T9(9,"f6yRJ9ym_I-7EqICfrerhaI0uBEEFAiyeUss8fzBh-0","翻新订单取货通知"),
	T10(10,"npWknfwPIwC7-wavy6fbjhFNpDPHxBNmRxqsVI_OEzM","门店收货通知"),
	T11(11,"p1R6r7cRLbH4yYeTFF5EZbyk2JU4TahiUNR0wFuhOMM","维修费用通知"),
	T12(12,"zwGZkCnBf43s6Cf0YAyKjuHDnJMWL4svWidE6l9UfGE","回收确认通知");
	
	int index;
	String templateId;
	String desc;
	
	WeixinMsgPushEnum(int index, String templateId, String desc){
		this.index = index;
		this.templateId = templateId;
		this.desc = desc;
	}
	
	public static String getTemplateIdByIndex(int index){
		String templateId = null;
		for(WeixinMsgPushEnum msgEnum : WeixinMsgPushEnum.values()){
			if(msgEnum.index == index){
				templateId = msgEnum.templateId;
			}
		}
		return templateId;
	}
	
	public static void main(String[] args) {
		System.out.println(WeixinMsgPushEnum.T1.templateId);
		System.out.println(WeixinMsgPushEnum.getTemplateIdByIndex(2));
	}
}
